import router from './index'
import { getToken } from '@/utils/token'

router.beforeEach((to, from, next) => {
  if (getToken() !== null && to.path === '/login') {
    next(false)
  } else {
    next()
  }
})
